from django import forms
from django.forms import widgets

from user.models import User
from user.models import UserInfo

class UserForm(forms.ModelForm):
    class Meta:
        model = User
        fields = ('phone', 'password')

class UserInfoForm(forms.ModelForm):
    post = forms.CharField(
        widget=widgets.Input(attrs={'class': 'form-control'})
    )
    class Meta:
        model=UserInfo
        fields=('sex', 'age', 'post')